//
//  CourseListModel.m
//  优学荟管理系统
//
//  Created by 星道 on 17/6/27.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "CourseListModel.h"

@implementation CourseListModel

//创建类
+ (instancetype)HNObjectValuesForKey:(NSDictionary *)Dict
{
    return [[self alloc] initWithHNObjectValuesForKey:Dict];
}

//实例化
- (instancetype)initWithHNObjectValuesForKey:(NSDictionary *)Dict
{
    self = [super init];
    if (self)
    {
        //KVC
        [self setValuesForKeysWithDictionary:Dict];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"])
    {
        self.ID = value;
    }
    
    if ([key isEqualToString:@"type"]) {
        self.Typexxxx = value;
    }
    
    if ([key isEqualToString:@"elementCount"]) {
        
        [value enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [self.ElementCountArr addObject:[[HNCourseListChartsModel alloc] init_ValuForKeyWithDict:obj]];
        }];
    }
    
    
}

- (NSMutableArray <HNCourseListChartsModel *>*)ElementCountArr {
    if (!_ElementCountArr) {
        _ElementCountArr = [NSMutableArray array];
    }
    return _ElementCountArr;
}
@end
